﻿using Guest_room.BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.UI.WebControls;

namespace GuestRoomMvc.Controllers
{
    public class RegisterController : Controller
    {
        // GET: Register
        public ActionResult Index()
        {
            return View();
        }
        [HttpPost]
        public ActionResult Result(string userType, string userid, string pwd, string againpwd)
        {
            GuestRoomService guestRoomService = new GuestRoomService();

            string resultMessage = guestRoomService.RegisterUser(userType, userid, pwd, againpwd);

            ViewBag.Message = resultMessage;
            return View();
        }
    }
}